array should not be empty php

34

array empty check in php -

if (empty($array)) {
     // list is empty.
}

array should not be empty php -

$arr = array();

if(!empty($arr)){
  echo "not empty";
}
else 
{
  echo "empty";
}

Comments

Submit
0 Comments